﻿$(document).ready(function(){
	initPage();	
	//$('#scform').submit();
});

function initPage() {
	//console.debug("initPage===begin====");
	$('#scform').submit(function(){
		//alert('sadasdasd');
		var TXT_NETBUSY = "\u7f51\u7edc\u7e41\u5fd9\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5\u2026";//网络繁忙，请稍后再试…
		var TXT_NETWAIT = "\u6b63\u5728\u83b7\u53d6\u6570\u636e\uff0c\u8bf7\u7a0d\u5019\u2026";//正在获取数据，请稍候…
		var TXT_POSTDATA = "\u6b63\u5728\u63d0\u4ea4\u6570\u636e\uff0c\u8bf7\u7a0d\u5019\u2026";//正在提交数据，请稍候…";
		
		//console.debug("initPage===111111111====");
		var form = $(this);
		var data = form.serializeArray();
		form.disabled();
		//console.debug("initPage===form.attr( action)===="+form.attr("action"));
		$.ajax({
			type: "POST",
			url: form.attr("action")+"?act=search",
			data: data,
			dataType: "json",
			success: function(ret){
				//alert("aqwdasdas"+ret);
				$('#div_rslist').html(TXT_NETWAIT).html(TrimPath.processDOMTemplate("template_jst", ret));
				form.enabled();
			},
			error: function(res){
				alert("error");
				$('#div_rslist').html(TXT_NETBUSY);
				form.enabled();
			}
		});
 
		
 

		return false;
	});



}//end initPage


function rs_el_Edit() {
	//console.debug("rs_el_Edit===begin====");
	window.location = "demo_edit.html";
}